home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / feel-075.lha / feel0.75 / Src / Makefile.386 < prev    next >
Makefile  |  1992-06-18  |  10KB  |  339 lines

  1. # ###################################################################### #
  2. # The FEEL makefile...                                                   #
  3. # ###################################################################### #
  4.  
  5. #
  6. # $Id: Makefile.386,v 1.1 1992/06/18 19:50:13 pab Exp $
  7. #
  8. # Makefile for msdos machines. 
  9.  
  10. ##########################################################################
  11. # Customisation section...                                               #
  12. ##########################################################################
  13.  
  14. # Edit the following for your favourite machine.
  15.  
  16. # Where Src directory lives
  17. BASE = \langs\feel
  18. #/net/brad/denton_export/denton/You/NewYou
  19.  
  20. # Feel knows about the systems below:
  21. # Stardent RS6000 Gould Sun4 Sun3 Clipper Vax Alliant Meiko 386
  22.  
  23. # Here is some info in case you have something different:
  24. #     WITH_SYSTEMV_SOCKETS - System V IP communication
  25. #     WITH_BSD_SOCKETS     - BSD IP communication (4.3, or see defs.h)
  26. #     WITH_SYSTEMV_SIGNALS - System V signalling
  27. #     WITH_BSD_SIGNALS     - BSD signalling
  28. #     DONT_HAVE_STDLIB_H   - half-hearted ANSI without stdlib.h
  29. #     ALIGN8 - if the machine is fussy about 8 byte alignments, e.g., doubles
  30. #     TRAP_ALL           - vauge attempt to catch segvs, buses, etc. implied by 
  31. #                 MACHINE=SYSTEMV
  32. # Architecture and machine type...
  33. # MACHINE is ANY,BSD or SystemV. 
  34. # ANY is any 'reasonable' architecture --- things that run UNIX, and many others
  35. # BSD is supported on any machine with a *-switch.s file in this 
  36. # directory. See the note in the manual for what it does, and how to port it.
  37. # SystemV is for sun3/4, Stardents and Alliant concentrix machines 
  38. # It ought to work for any UNIX machine that has shared memory primitives 
  39. # and that BSD config. works for.
  40.  
  41. # Systems not listed but have worked in the 'ANY' config:
  42. # DEC MIPS (try hacking the ard-switch code for BSD version)
  43.  
  44. # Extra goodies, won't necesarily work
  45. # -DBCI         Want a bytecode interpreter?
  46. # -DLOWTAGINTS        Low tag integers kind of work, 
  47. #            but break the addons code (and maybe other things)
  48. #     READLINE           - used to work. Bit rot may have set in here.
  49.  
  50. # common options
  51.  
  52. # how to optimise your code
  53. STDOFLAGS = # -DDEBUG
  54.  
  55. # everybody needs these
  56. STDFLAGS =  -DWITH_FUDGE 
  57.  
  58. # Stardent
  59. #MFLAGS = -DWITH_SYSTEMV_SOCKETS \
  60. #        -DDONT_HAVE_STDLIB_H -DBCI
  61. #OFLAGS =  -O -inline 
  62. #MACHINE = BSD # Can be SYSTEMV
  63. #ARCH = ard#a43
  64. #CC = cc  #-43
  65. #LIBS = -lm
  66.  
  67. # Sun4
  68. #MFLAGS = -DWITH_SYSTEMV_SOCKETS -DDONT_HAVE_STDLIB_H -DBCI
  69. #OFLAGS = -O  
  70. #MACHINE = BSD #or SYSTEMV, for the keen
  71. #ARCH = sun4
  72. #CC = gcc
  73. #LIBS = -lm
  74.  
  75. # RS6000
  76. #MFLAGS = -DWITH_SYSTEMV_SOCKETS \
  77. #         -DWITH_SYSTEMV_SIGNALS -DTRAP_ALL -D_ALL_SOURCE
  78. #MACHINE = ANY
  79. #ARCH = any
  80. #CC = xlc
  81. #LIBS = -lm
  82.  
  83. # Gould
  84. #MFLAGS = -DWITH_BSD_SIGNALS \
  85. #        -DDONT_HAVE_STDLIB_H  -DALIGN8
  86. #MACHINE = ANY
  87. #ARCH = any
  88. #CC = gcc
  89. #LIBS = -lm
  90.  
  91.  
  92. # Sun3
  93. #MFLAGS =  -DWITH_SYSTEMV_SOCKETS -DDONT_HAVE_STDLIB_H 
  94. #MACHINE = BSD
  95. #ARCH = sun3
  96. #CC = gcc
  97. #LIBS = -lm
  98.  
  99. # Clipper
  100. #MFLAGS = -DDONT_HAVE_STDLIB_H  -DWITH_BSD_SIGNALS -DALIGN8
  101. #MACHINE = BSD
  102. #ARCH = clip
  103. #CC = ncc
  104. #LIBS = /lib/crt0.o
  105.  
  106. # Vax
  107. #MFLAGS = -mg -O -DDONT_HAVE_STDLIB_H
  108. #MACHINE = ANY
  109. #ARCH = any
  110. #CC = gcc
  111. #LIBS = -lm
  112.  
  113. # Alliant
  114. #MFLAGS = -DWITH_BSD_SIGNALS -DWITH_BSD_SOCKETS -DALIGN8
  115. #MACHINE = SYSTEMV
  116. #ARCH = i860
  117. #CC = fxc
  118. #LIBS = -lm
  119.  
  120. # Meiko
  121. # MFLAGS =
  122. # MACHINE = ANY
  123. # CC = mcc
  124. # LIBS = -lm
  125. # EXTRASRCS = 
  126. # EXTRAOBJS =
  127.  
  128. # 386
  129. # ...
  130. XFLAGS = -DDONT_HAVE_STDLIB_H -DWITH_FUDGE -DBCI -Dmsdos
  131. OFLAGS =  -O  
  132. MACHINE = BSD
  133. ARCH = 386
  134. CC = gcc  #-43
  135. LIBS = -lm
  136.  
  137. # i860
  138. # Not an alliant? 
  139. # Try MACHINE=BSD, then change the shared memory primitives around
  140. #
  141.  
  142. # ################################################################### #
  143. # Sundry constants                              #
  144. # ################################################################### #
  145. LEX = flex
  146. YACC = bison -y -t
  147.  
  148. # Local module path
  149.  
  150. MODULE_PATH = ${BASE}/Modules/
  151.  
  152. # Semaphoring...
  153. # Hardware semaphores are OK, but
  154. SEMAPHORES = SOFTWARE
  155.  
  156. # Do the business...
  157.  
  158. # ###################################################################### #
  159. # Working section...                                                     #
  160. # ###################################################################### #
  161.  
  162. LOAD_PATH_NAME = FEEL_LOAD_PATH
  163.  
  164. MACHINEABBREV = ${ARCH}
  165. DATE = `date`
  166.  
  167. # invent flags
  168. FLAGS = ${XFLAGS} ${STDFLAGS}
  169.  
  170. # Reader specific sources...
  171.  
  172. READERSOURCES = lex-yy.c y-tab.c alloca.c
  173.  
  174. READEROBJECTS = lex-yy.o y-tab.o alloca.o
  175.  
  176. # Default Elvira sources...
  177.  
  178. ELVIRASOURCES = initelv.c
  179.  
  180. ELVIRAOBJECTS = initelv.o
  181.  
  182. # Garbage collector sources
  183.  
  184. GCOBJECTS = ../CGC/gc.o remalloc.o 
  185.  
  186. # Main sources...
  187.  
  188. SOURCES = copyalloc.c copy.c arith.c basic.c chars.c error.c \
  189.       main.c modules.c print.c read.c set.c streams.c \
  190.       table.c vectors.c bootstrap.c lists.c listops.c \
  191.       class.c slots.c ngenerics.c \
  192.           symboot.c modboot.c toplevel.c root.c specials.c \
  193.       calls.c ccc.c macros.c system.c semaphores.c state.c \
  194.       format.c sockets.c sio.c modops.c lamport.c bvecs2.c 
  195.  
  196. OBJS1 =  copyalloc.o copy.o arith.o basic.o chars.o error.o 
  197. OBJS2 =      main.o modules.o print.o read.o set.o streams.o 
  198. OBJS3 =      table.o vectors.o bootstrap.o lists.o listops.o 
  199. OBJS4 =       class.o slots.o ngenerics.o  
  200. OBJS5 =           symboot.o modboot.o toplevel.o root.o specials.o 
  201. OBJS6 =       calls.o ccc.o macros.o system.o semaphores.o state.o 
  202. OBJS7 =       format.o sockets.o sio.o modops.o lamport.o bvecs2.o 
  203.  
  204. OBJECTS = ${OBJS1} ${OBJS2} ${OBJS3} ${OBJS4} ${OBJS5} ${OBJS6} ${OBJS7} 
  205.  
  206. HDRS = bootstrap.h   generics.h    modules.h     specials.h    toplevel.h \
  207.     calls.h       global.h      ngenerics.h   state.h       vectors.h \
  208.     ccc.h         lamport.h     objects.h     structs.h     version.h \
  209.     class.h       lex_global.h  root.h        symboot.h     y-tab.h      \
  210.     copy.h        listops.h     runtime.h     syssockets.h    funcalls.h weak.h \
  211.     defs.h        lists.h       semaphores.h  system_p.h    yyfudge.c    allocate.h  \
  212.     error.h       macros.h      sio.h         system_t.h    bvf.h    modops.h garbage.h  \
  213.     format.h      modboot.h     slots.h       table.h    threads.h iset.h sockets.h  \
  214.     interpret.h   bytecodes.h
  215.  
  216. COSOURCES = ${MACHINEABBREV}-switch.s threads.c 
  217.  
  218. COOBJECTS = ${MACHINEABBREV}-switch.o threads.o
  219.  
  220. DISTRIBCO = sun3-switch.s sun4-switch.s ard-switch.s clip-switch.s any-switch.s i860-switch.s \
  221.         386-switch.s Makefile 
  222.  
  223. KERNELLISP= defs.em extras0.em initcode.em macros0.em standard0.em sockets.em semaphores.em bitvecs.em
  224.  
  225.  
  226. # Lisp object file
  227.  
  228. LISPOBJECTS = LispSrc/all-lisp.o
  229.  
  230. ISOURCES = interpret.c
  231. IHDRS = bytecodes.h interpret.h
  232. IOBJECTS = interp.o
  233. # Lisp object file
  234.  
  235. LISPOBJECTS = LispSrc/all-lisp.o
  236.  
  237. #you:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS} ${IOBJECTS}
  238. #    -touch you
  239. #    rm you
  240. #    ${CC} -yinitialise_readstr -o you ${OBJECTS} ${COOBJECTS} \
  241. #             ${READEROBJECTS} ${IOBJECTS} ${ELVIRAOBJECTS} ${LIBS}
  242. #    echo 
  243.  
  244. you:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS} ${IOBJECTS}
  245.         echo ${OBJS1} > linkfile
  246.         echo ${OBJS2} >> linkfile
  247.         echo ${OBJS3} >> linkfile
  248.         echo ${OBJS4} >> linkfile
  249.         echo ${OBJS5} >> linkfile
  250.         echo ${OBJS6} >> linkfile
  251.         echo ${OBJS7} >> linkfile
  252.         echo ${READEROBJECTS} >> linkfile
  253.         echo ${COOBJECTS} >> linkfile
  254.         echo ${IOBJECTS} >> linkfile
  255.         echo ${ELVIRAOBJECTS} >> linkfile
  256.     echo ${LIBS} >> linkfile
  257.     ${CC}  -o you @linkfile
  258.     echo 
  259.  
  260. #nelvira:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${IOBJECTS}
  261. #    ld -r -o feel_elvira.o ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${IOBJECTS}
  262. #    mv feel_elvira.o ../Objs/${ARCH}-elvira.o
  263. #    echo 
  264.  
  265. #feel_elvira.o:    elvira
  266.  
  267. #feel:    feel_elvira.o ${LISPOBJECTS}
  268. #    (cd LispSrc; make all-lisp.o)
  269. #    ecc -o feel ${LISPOBJECTS}
  270. #    echo  
  271.  
  272. #reader:        
  273. #    ${LEX} comp.lex
  274. #    ${YACC} test.yac
  275.  
  276. # Sicko bytecode hacking
  277. # preprocess explicitly, then compile the result, after stripping out
  278. # cpp control codes. Ugh. Makes debugging easier though.
  279. #interp.o: interpret.c bytecodes.h interpret.h
  280. #    gcc -E interpret.c ${FLAGS} \
  281. #         -DMACHINE_${MACHINE} \
  282. #         -DMODULE_PATH=\"${MODULE_PATH}\" \
  283. #         -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
  284. #         -DSEMAPHORES_${SEMAPHORES} \
  285. #         -DMAKE_DATE="\"${DATE}\"" \
  286. #    > interp.c
  287. #    ${CC} -c ${FLAGS} interp.c
  288. #
  289. #.c.o:
  290. #    ${CC} -c $*.c ${FLAGS} \
  291. #         -DMACHINE_${MACHINE} \
  292. #         -DMODULE_PATH=\"${MODULE_PATH}\" \
  293. #         -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
  294. #         -DSEMAPHORES_${SEMAPHORES} \
  295. #         -DMAKE_DATE="\"${DATE}\"" 
  296. #
  297.  
  298. interp.o: interpret.c bytecodes.h interpret.h bvf.h iset.h
  299.     echo -DMACHINE_${MACHINE}                        > compfile
  300.     echo -DMODULE_PATH=\"${MODULE_PATH}\"           >> compfile
  301.     echo -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\"     >> compfile
  302.     echo -DSEMAPHORES_${SEMAPHORES}             >> compfile
  303.     echo -DMAKE_DATE="\"${DATE}\""              >> compfile
  304.     ${CC} -c interpret.c ${FLAGS} @compfile
  305.     rename interpret.o interp.o
  306.  
  307. .c.o:
  308.     echo -DMACHINE_${MACHINE}                        > compfile
  309.     echo -DMODULE_PATH=\"${MODULE_PATH}\"           >> compfile
  310.     echo -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\"     >> compfile
  311.     echo -DSEMAPHORES_${SEMAPHORES}             >> compfile
  312.     echo -DMAKE_DATE="\"${DATE}\""              >> compfile
  313.     ${CC} -c ${FLAGS} $*.c @compfile
  314.  
  315.  
  316. version: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP}
  317.     rcsfreeze 
  318.  
  319. tar: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} \
  320.     ${HDRS} ${KERNELLISP} ${ISOURCES} ${IHDRS}
  321.     tar chf -  ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} \
  322.                ${DISTRIBCO} ${HDRS} ${KERNELLISP} ${ISOURCES} ${IHDRS} \
  323.       | compress > you.tar.Z
  324.  
  325. # Rather assumes that you have X...
  326.  
  327. depend: ${SOURCES} ${HDRS} ${READERSOURCES} ${COSOURCES}
  328.     makedepend -s "# DO NOT DELETE THIS LINE" -- ${FLAGS} -- ${SOURCES} ${COSOURCES} 
  329.  
  330. clean:
  331.     rm ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} you
  332.  
  333.  
  334. ${MACHINE}-coroutine.o:    ${MACHINE}-coroutine.s
  335.         ${CC} -c ${MACHINE}-coroutine.s
  336.  
  337. #if there is odd stuff below this line, remove it and do make depend.
  338.